package cn.com.cym.gamezao.entity.recruit;

import cn.com.cym.gamezao.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDate;

@Setter
@Getter
@NoArgsConstructor
@Entity
@Accessors(chain = true)
@Table(name = "r_work_history")
@ApiModel(description="工作经历")
public class WorkHistory extends BaseEntity implements Serializable {


    private static final long serialVersionUID = 6035302046107617619L;


    @ApiModelProperty(value = "开始时间",required = true,dataType = "LocalDate")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate startDate;


    @ApiModelProperty(value = "结束时间",required = true,dataType = "LocalDate")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDate;

    /**
     * 单位名称
     */
    @Column(length = 300)
    @ApiModelProperty(value = "工作单位",required = true,dataType = "String")
    private String companyName;


    /**
     * 职位
     */
    @Column(length = 160)
    @ApiModelProperty(value = "职位",required = true,dataType = "String")
    private String position;

  /*  *//**
     * JsonIgnore 防止无限递归
     *//*
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "user_id",nullable = false)
    @JsonIgnore
    private User user;*/
}
